const {webToken} = require("@common/utils")
const {send} = require("@common/utils")

class LoginController {
  async login(ctx,next){
    let {id,name} = ctx.user
    let token = webToken({id,name})
    send(ctx,200,'200','登录成功',{id,name,token})
  }
}


module.exports = new LoginController()